<?
define('_AOW93KKDIEQ',true);
include("includes/config.php");


$act=  isset($_GET['opt'])        ?    $_GET['opt']     : "idx";
$name=  isset($_GET['name'])      ?    $_GET['name']    : "";



$choice = array(
				"login" => "login",
				"logout"	=> "logout",
				"check" => "check",
                "idx"    => "index",
				"sendms" => "insertms"
				);

if(!isset($choice[$act]))
{
	$act="login";
}

if($act!="login")
{
	if($act!="logout")$_SESSION['n']=$name;
	CheckLoginChat();
}

//Run the actually source
require("source/chat/".$choice[$act].".php");
include("templates/chat/".$choice[$act].".tpl");
?>